﻿<div class="widget-content">
    <div class="widget-box">
        <div class="widget-title">
            <span class="icon"><i class="icon-align-justify"></i></span>
            <h5>
                填写新的密码</h5>
        </div>
        <div class="widget-content nopadding">
            @if (IsPost == true)
            { 
                <div class="widget-content" style="border: 0px">
                    @if (ViewBag.Result > 0)
                    {
                        <div class="alert alert-success">
                            <a class="close" data-dismiss="alert" href="#">×</a>
                            <h4 class="alert-heading">
                                保存成功!</h4>
                            密码已修改成功！
                        </div>
                    }
                    else
                    {
                        <div class="alert alert-error">
                            <a class="close" data-dismiss="alert" href="#">×</a>
                            <h4 class="alert-heading">
                                保存失败!</h4>
                            @if (ViewBag.Result == -1)
                            {
                                @Html.Raw("您两次输入的密码不一致，请重新输入密码。")
                            }
                            else
                            {
                                @Html.Raw("如确认您的数据填写无误，请联系管理员或查看错误日志。")
                            }
                        </div>
                    }
                </div>
            }
            <form action="@Url.Action("Edit", "User")" method="post" class="form-horizontal">
            <div class="control-group">
                <label class="control-label">
                    用户名:</label>
                <div class="controls">
                    <input name="Name" type="text" class="span6" disabled="disabled" value="@Session["UserName"]" />
                    <span class="help-block">当前登录的用户名</span>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    新密码:</label>
                <div class="controls">
                    <div class="span6">
                        <input name="Pwd" type="password" value="" q="q" maxl="50" />
                        <span class="help-block">请选择您的新密码</span>
                    </div>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    确认密码:</label>
                <div class="controls">
                    <div class="span6">
                        <input name="Pwd2" type="password" value="" q="q" maxl="50" />
                        <span class="help-block">请选择您重新输入您的新密码</span>
                    </div>
                </div>
            </div>
            <div class="form-actions">
                <button type="submit" class="btn btn-success" onclick="return checkfrom2()">
                    保 存</button>
            </div>
            </form>
        </div>
    </div>
</div>
